Skip to content

fix: drop node-shim-era stdin overrides (markdownlint-cli2, prettier)#24

Open
charliie-dev wants to merge 3 commits into
feat/discovery-first-toolingfrom
fix/stdin-overrides
Open

fix: drop node-shim-era stdin overrides (markdownlint-cli2, prettier)#24
charliie-dev wants to merge 3 commits into
feat/discovery-first-toolingfrom
fix/stdin-overrides

Conversation

@charliie-dev

Copy link
Copy Markdown
Owner

Stacked on #21 (feat/discovery-first-tooling) — re-target/rebase after it merges.

What

Both remaining bun node-shim-era stdin workarounds are removed now that mise ships real node:

  • fix(lint) — shrink the markdownlint-cli2 override to args-only (--config for the global .markdownlint.yml + -). stdin mode and the parser are inherited from upstream nvim-lint, whose errorformat fallback (stdin:%l %m) keeps findings that carry no column — the old from_pattern required path:line:col, so col-less findings (e.g. MD012/no-multiple-blanks) were silently dropped. stdin also means the buffer's live content is linted instead of the on-disk file.
  • refactor(conform) — drop the prettier --write-on-temp-copy override; conform's built-in definition (stdin + --stdin-filepath) takes over, so no .conform.$RANDOM.* copy is written per format.

Audited the rest of both configs for the same class of issue: selene (args-only, config path) and shuck (file-based is the tool's own limitation; JSON parser has col fallbacks) are legitimate; fixjson is the only other node tool on a stdin path and works with real node (tested) — no override ever existed for it.

Verification

  • Headless lint of a markdown buffer: MD012 (col-less) ×2 + MD009 (with col) all reported; a 120-char line does not trigger MD013, proving --config applies through the stdin path.
  • Headless conform.format() on a JS buffer: formatted via the built-in stdin definition (stdin=true, available).
  • Harnesses: conform-probe-smoke, lint-reload-smoke, lint-sweep-smoke, lint-broken-reason-smoke — 17/17 scenarios PASS.
  • stylua --check + selene clean.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@charliie-dev
charliie-dev force-pushed the feat/discovery-first-tooling branch from afb1ff1 to a37d44f Compare July 22, 2026 10:59
@charliie-dev
charliie-dev force-pushed the fix/stdin-overrides branch from 034d863 to dfe0088 Compare July 22, 2026 11:07
@charliie-dev
charliie-dev force-pushed the feat/discovery-first-tooling branch from cfe347f to 26d30cb Compare July 22, 2026 13:46
the from_pattern parser required path:line:col, but markdownlint omits the
column when unknown (e.g. MD012), so those findings were silently dropped.
inheriting upstream's stdin mode + errorformat parser (whose "stdin:%l %m"
fallback keeps col-less findings) fixes that; the file-based shape is no
longer needed now that mise ships real node. stdin also means the buffer's
live content is linted instead of the on-disk file. only the --config arg
pointing at the global .markdownlint.yml remains overridden.
the --write-on-temp-copy shape existed because the bun node-shim broke
stdin; mise ships real node now and stdin works again, so conform's
built-in prettier definition (stdin + --stdin-filepath) takes over —
no more .conform.$RANDOM.* copy written per format.
Trusting a function-form command blindly as self-resolving let the
prettier dep silently leave the install/warn contract: on a fresh
machine with no node_modules copy and no global binary, nothing would
ever install it or name it in the aggregated warning (a regression
against main's ensure_installed loop).

Evaluate the function against the probe-time buffer the way conform
will: a project-local node_modules bin passes the $PATH check as-is,
the bare-name fallback re-enters install/warn via the bin index, and a
failed or non-string evaluation degrades to the previous self-resolving
behavior — never a typo report.
@charliie-dev
charliie-dev force-pushed the fix/stdin-overrides branch from dfe0088 to c1b545e Compare July 22, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant